﻿using SlamCms.Common;

namespace SlamCms.Web.Mvc
{
	public class FileDataResult : ExtendedFileStreamResult
	{
		public FileDataResult(FileData fileData) : base(fileData.Content, fileData.ContentType)
		{
			this.FileData = fileData;
			this.SetEtag(fileData.Tag);
			this.SetLastModified(fileData.LastModified);
			this.SetNoContentTypeSniffing();
		}

		public FileData FileData { get; private set; }
	}
}